<html>
<head>
<#include "../common/header.ftl">
    <title>商品列表</title>
</head>
<body>
<div id="wrapper" class="toggled">
<#-- 边栏sidebar start -->
<#include "../common/nav.ftl">
<#-- 边栏sidebar end -->

<#-- 主要内容content start -->
    <div id="page-content-wrapper">
        <div class="container-fluid">
            <div class="row clearfix">
                <div class="col-md-12 column">
                    <form role="form" method="post" action="/sell/seller/product/save">
                        <div class="form-group">
                            <label for="productName">名称</label>
                            <input type="text" class="form-control" id="productName" name="productName"
                                   value="${(product.productName) ! ''}"/>
                        </div>

                        <div class="form-group">
                            <label for="productPrice">价格</label>
                            <input type="text" class="form-control" id="productPrice" name="productPrice"
                                   value="${(product.productPrice) ! ''}"/>
                        </div>

                        <div class="form-group">
                            <label for="productStock">库存</label>
                            <input type="number" class="form-control" id="productStock" name="productStock"
                                   value="${(product.productStock) ! ''}"/>
                        </div>

                        <div class="form-group">
                            <label for="productDescription">描述</label>
                            <input type="text" class="form-control" id="productDescription" name="productDescription"
                                   value="${(product.productDescription) ! ''}"/>
                        </div>

                        <div class="form-group">
                            <label for="productIcon">图片</label>
                            <img src="${(product.productIcon) ! ''}" alt="${(product.productName) ! ''}" width="200px" height="200px">
                            <input type="text" class="form-control" id="productIcon" name="productIcon"
                                   value="${(product.productIcon) ! ''}"/>
                        </div>

                        <div class="form-group">
                            <label for="categoryType">类目</label>
                            <select class="form-control" name="categoryType" id="categoryType">
                            <#list productCategoryList as productCategory>
                                <option value="${productCategory.categoryType}"
                                        <#if (product.categoryType)?? && product.categoryType == productCategory.categoryType>selected</#if>>
                                ${productCategory.categoryName}</option>
                            </#list>
                            </select>
                        </div>
                        <input type="hidden"  name="productId" value="${(product.productId) ! ''}"/>
                        <button type="submit" class="btn btn-default btn-primary">保存</button>
                    </form>
                </div>
            </div>
        </div>
    </div>
<#-- 主要内容content end -->
</div>

</body>
</html>
